package cn.edu.ustc.xrovers.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table
public class Manager {

	private Integer id;
	private String managerId;
	private String password;
	private String name;
	private String tel;
	private Set<Loan> loans=new HashSet<Loan>();
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	@OneToMany(mappedBy="manager")
	public Set<Loan> getLoans() {
		return loans;
	}
	@Column(name="Man_ID")
	public String getManagerId() {
		return managerId;
	}
	@Column(name="Man_Name")
	public String getName() {
		return name;
	}
	@Column(name="Man_Password")
	public String getPassword() {
		return password;
	}
	@Column(name="Man_Tel")
	public String getTel() {
		return tel;
	}
	/*set方法*/
	public void setId(Integer id) {
		this.id = id;
	}
	public void setLoans(Set<Loan> loans) {
		this.loans = loans;
	}
	public void setManagerId(String managerId) {
		this.managerId = managerId;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	
}
